From 70bce6f0b70efd49a025c2385989a7851fd24efb Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Thu, 18 May 2006 18:37:26 +0000 Subject: [PATCH] Moving and rewriting options for filters git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2095 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/xmldoc/filters/duplicate.xml | 50 +++++++------------ .../xmldoc/filters/options/duplicate-all.xml | 16 ++++++ .../filters/options/duplicate-correct.xml | 22 +++++++- .../filters/options/duplicate-location.xml | 8 +++ .../filters/options/duplicate-shortname.xml | 8 +++ .../xmldoc/filters/options/radius-asroute.xml | 12 +++++ .../filters/options/radius-distance.xml | 14 +++++- .../xmldoc/filters/options/radius-exclude.xml | 6 ++- .../xmldoc/filters/options/radius-lat.xml | 9 +++- .../xmldoc/filters/options/radius-lon.xml | 9 +++- .../filters/options/radius-maxcount.xml | 23 ++++++++- .../xmldoc/filters/options/radius-nosort.xml | 5 ++ gpsbabel/xmldoc/filters/radius.xml | 39 ++++++--------- 13 files changed, 159 insertions(+), 62 deletions(-) diff --git a/gpsbabel/xmldoc/filters/duplicate.xml b/gpsbabel/xmldoc/filters/duplicate.xml index 639cfa8e2..79b85af9d 100644 --- a/gpsbabel/xmldoc/filters/duplicate.xml +++ b/gpsbabel/xmldoc/filters/duplicate.xml @@ -1,34 +1,20 @@ - - - The duplicate filter is designed to remove duplicate - points based on their shortname (traditionally a waypoint's - name on the GPS receiver), and/or their location (to a - precision of 6 decimals). This filter supports two options - that specify how duplicates will be recognized, "shortname" and "location". Generally, at least - one of these options is REQUIRED. - - Using duplicate filter to suppress points with same name and locations - gpsbabel -i gpx -f 1.gpx -f 2.gpx -x duplicate,location,shortname \ - -o gpx -F merged_with_no_dupes.gpx - - would remove points that have duplicate shortnames - *AND* duplicate locations. The result would be a GPX file - that more than likely contains only unique points and point - data. - The duplicate filter can also take an "all" option. - If you specify that option, all instances of a duplicated - waypoint will be removed, not just the second and subsequent - instances. If your input file contains waypoints A, B, B, - and C, the output file will contain waypoints A, B, and C - without the "all" option, or just A and C with the "all" - option. This option can be useful as an "ignore list" in - some circumstances. + +The duplicate filter is designed to remove duplicate points based on their +short name (traditionally a waypoint's name on the GPS receiver), and/or +their location (to a precision of 6 decimals). This filter supports two +options that specify how duplicates will be recognized, + and . +Generally, at least one of these options is required. - Finally, the duplicate filter takes a - "" option. If you specify that - option, the latitude and longitude frmo later duplicates will - replace the latitude and longitude in earlier waypoints. You - can use this to apply a list of "waypoint corrections" to a larger - file, while keeping all of the other details from the larger - file. + + Using the duplicate filter to suppress points with the same + name and location + + This command line removes points that have duplicate short names + and duplicate locations. The result would be a + gpx file that more than likely + contains only unique points and point data. + + gpsbabel -i gpx -f 1.gpx -f 2.gpx -x duplicate,location,shortname -o gpx -F merged_with_no_dupes.gpx + diff --git a/gpsbabel/xmldoc/filters/options/duplicate-all.xml b/gpsbabel/xmldoc/filters/options/duplicate-all.xml index 8b1378917..f258666de 100644 --- a/gpsbabel/xmldoc/filters/options/duplicate-all.xml +++ b/gpsbabel/xmldoc/filters/options/duplicate-all.xml @@ -1 +1,17 @@ + +When this option is specified, GPSBabel will remove all instances of a +duplicated waypoint, not just the second and subsequent instances. If +your input file contains waypoints A, B, B, and C, the output file will +contain waypoints A, B, and C without the option, +or just A and C with the option. + + +Using the duplicate filter to implement an "ignore list." + +This option may be used to implement an "ignore list." In the following +example, the duplicate filter is used to remove a list of waypoints to be +ignored from a larger collection of waypoints: + +gpsbabel -i gpx -f waypoints.gpx -i csv -f to_ignore.csv -x duplicate,shortname,all -o gpx -f filtered.gpx + diff --git a/gpsbabel/xmldoc/filters/options/duplicate-correct.xml b/gpsbabel/xmldoc/filters/options/duplicate-correct.xml index 8b1378917..20741d15b 100644 --- a/gpsbabel/xmldoc/filters/options/duplicate-correct.xml +++ b/gpsbabel/xmldoc/filters/options/duplicate-correct.xml @@ -1 +1,21 @@ - + +This option is used to change the locations of waypoints without losing any +of the other associated information. When this option is specified, the +latitude and longitude from later duplicates will replace the latitude and +longitude in the original waypoint. + + +As an example, this option may be used to adjust the locations of "puzzle" +geocaches in a Groundspeak pocket query: + + +Using the duplicate filter to correct the locations of "puzzle" +geocaches +gpsbabel -i gpx -f 43622.gpx -i csv -f corrections.csv -x duplicate,shortname,correct -o gpx -F 43622-corrected.gpx + +After this command is run, the waypoints in the output file will have all +of the descriptive information from 43622.gpx, but +waypoints that were also found in corrections.csv +will have their coordinates replaced with the coordinates from that file. + + diff --git a/gpsbabel/xmldoc/filters/options/duplicate-location.xml b/gpsbabel/xmldoc/filters/options/duplicate-location.xml index 8b1378917..910bfc30c 100644 --- a/gpsbabel/xmldoc/filters/options/duplicate-location.xml +++ b/gpsbabel/xmldoc/filters/options/duplicate-location.xml @@ -1 +1,9 @@ + +This option causes the duplicate filter to remove any additional waypoint +that has the same coordinates (to six decimal degrees) as a waypoint that +came before. This option may be used to remove duplicate waypoints if the +names are not expected to be the same. It also might be used along with the + option to remove duplicate waypoints if the names +of several unrelated groups of waypoints might be the same. + diff --git a/gpsbabel/xmldoc/filters/options/duplicate-shortname.xml b/gpsbabel/xmldoc/filters/options/duplicate-shortname.xml index 8b1378917..72f88c2fc 100644 --- a/gpsbabel/xmldoc/filters/options/duplicate-shortname.xml +++ b/gpsbabel/xmldoc/filters/options/duplicate-shortname.xml @@ -1 +1,9 @@ + +This option is the one most often used with the duplicate filter. This +option instructs the duplicate filter to remove any waypoints that share +a short name with a waypoint that has come before. This option might be +used to remove duplicates if you are merging two datasets that were +each created in part from a common ancestor dataset. + + diff --git a/gpsbabel/xmldoc/filters/options/radius-asroute.xml b/gpsbabel/xmldoc/filters/options/radius-asroute.xml index 8b1378917..4cd6539f9 100644 --- a/gpsbabel/xmldoc/filters/options/radius-asroute.xml +++ b/gpsbabel/xmldoc/filters/options/radius-asroute.xml @@ -1 +1,13 @@ + +This option specifies the name of a route. If this option is specified, the +radius filter puts all points that are kept into a route with the given name. +The order of points in the route is by distance from the center (unless the + option is also specified.) + + +Note that this route is not necessarily the most efficient route to visit +all of the points. In fact, for some data sets, it might be the least +efficient route. + + diff --git a/gpsbabel/xmldoc/filters/options/radius-distance.xml b/gpsbabel/xmldoc/filters/options/radius-distance.xml index 8b1378917..7e4ff8212 100644 --- a/gpsbabel/xmldoc/filters/options/radius-distance.xml +++ b/gpsbabel/xmldoc/filters/options/radius-distance.xml @@ -1 +1,13 @@ - + +This option is required. + + +This option specifies the maximum distance a point may be from the central +point in order to remain in the dataset. Points closer than this distance +will be kept and points further away will be removed (unless the + option is specified.) + + +Distances may be expressed in miles (3M) or kilometers (4K). If no units +are provided, the distance is assumed to be in miles. + diff --git a/gpsbabel/xmldoc/filters/options/radius-exclude.xml b/gpsbabel/xmldoc/filters/options/radius-exclude.xml index 8b1378917..434a35b80 100644 --- a/gpsbabel/xmldoc/filters/options/radius-exclude.xml +++ b/gpsbabel/xmldoc/filters/options/radius-exclude.xml @@ -1 +1,5 @@ - + +If this option is included, the action of the radius filter will be reversed: +points within the given distance will be removed, and points further away +will be kept. + diff --git a/gpsbabel/xmldoc/filters/options/radius-lat.xml b/gpsbabel/xmldoc/filters/options/radius-lat.xml index 8b1378917..bfe5c23e9 100644 --- a/gpsbabel/xmldoc/filters/options/radius-lat.xml +++ b/gpsbabel/xmldoc/filters/options/radius-lat.xml @@ -1 +1,8 @@ - + +This option is required. + + +This option specifies the latitude of the central point in decimal degrees. +South latitudes should be expressed as a negative number. Valid values for +this option are from -90 to 90. + diff --git a/gpsbabel/xmldoc/filters/options/radius-lon.xml b/gpsbabel/xmldoc/filters/options/radius-lon.xml index 8b1378917..cca861e5a 100644 --- a/gpsbabel/xmldoc/filters/options/radius-lon.xml +++ b/gpsbabel/xmldoc/filters/options/radius-lon.xml @@ -1 +1,8 @@ - + +This option is required. + + +This option specifies the longitude of the central point in decimal degrees. +West longitudes should be expressed as a negative number. Valid values for +this option are from -180 to 180. + diff --git a/gpsbabel/xmldoc/filters/options/radius-maxcount.xml b/gpsbabel/xmldoc/filters/options/radius-maxcount.xml index 8b1378917..2ca05844d 100644 --- a/gpsbabel/xmldoc/filters/options/radius-maxcount.xml +++ b/gpsbabel/xmldoc/filters/options/radius-maxcount.xml @@ -1 +1,22 @@ - + +This option specifies the maximum number of points that the radius filter may +keep. If there are more than this number of points within the specified +distance of the center, the more distant points will be discarded even though +they are within the specified distance. If this option is not specified, +all points are kept regardless of how many there are. + + +Note that if the option is also specified, this +option will instead keep points based on their position within the input +file rather than on their distance from the center. This may or may not be +what you want. + + +Note, too, that this option may be used with the +option, but the results might not be what you expect. In particular, the +results will not be the same as if you had kept all of the points you'd +otherwise throw away. You will still get no more than +maxcount points, but they will all be at least +distance away from the center. (And possibly sorted.) + + diff --git a/gpsbabel/xmldoc/filters/options/radius-nosort.xml b/gpsbabel/xmldoc/filters/options/radius-nosort.xml index 8b1378917..42ba6d5e5 100644 --- a/gpsbabel/xmldoc/filters/options/radius-nosort.xml +++ b/gpsbabel/xmldoc/filters/options/radius-nosort.xml @@ -1 +1,6 @@ + +If this option is specified, the radius filter will not sort the remaining +points by distance from the center. They will remain in whatever order they +were originally. + diff --git a/gpsbabel/xmldoc/filters/radius.xml b/gpsbabel/xmldoc/filters/radius.xml index ff619d7bb..cdc970f40 100644 --- a/gpsbabel/xmldoc/filters/radius.xml +++ b/gpsbabel/xmldoc/filters/radius.xml @@ -1,26 +1,17 @@ - - - The radius filter is designed to include points based - on their proximity to a central point. Distances and the - central point are declared on the command line by passing the - , - , and - options to - the filter. Distance options may be expressed in miles - () or - kilometers (). The default is - zero miles. Additionally, the exclude option may be - specified to reverse the effect of the filter, so that points - further from the center are kept and closer points are - discarded. - - Using radius filter to identify points close to a given point - gpsbabel -i geo -f 1.loc \ - -x radius,distance=1.5M,lat=30.0,lon=-90.0 \ - -o mapsend \ - -F 2.wpt - - would include only points within 1.5 miles of N30.000 - W90.000 + +This filter includes or excludes waypoints based on their proximity to a +central point. All waypoints more than the specified distance from the +specified point will be removed from the dataset. + + +By default, all remaining points are sorted so that points closer to the +center appear earlier in the output file. + + Using the radius filter to find points close to a given point + This example command line would include only points within 1 1/2 miles + of N30.000 W 90.000 + +gpsbabel -i geo -f 1.loc -x radius,distance=1.5M,lat=30.0,lon=-90.0 -o mapsend -F 2.wpt + -- 2.30.2